import request from '@/utils/request'

export function fetchAdd(params) {
  return request({
    url: '/exam/paper/insert/',
    method: 'post',
    data: params
  })
}
/* 我的试卷页右侧table请求 */
export function fetchList(page, rows) {
  return request({
    url: '/exam/paper/list?page=' + page + '&rows=' + rows,
    method: 'get'
  })
}
/* 我的试卷页右侧单项删除请求 */
export function fetchDel(id) {
  return request({
    url: '/exam/paper/delete?ids=' + id,
    method: 'delete'
  })
}
export function fetchListSearch(key) {
  return request({
    url: '/exam/paper/list?key=' + key,
    method: 'get'
  })
}
/* 待处理页面进入右侧table请求 */
export function fetchTreatedList() {
  return request({
    url: '/exam/userPaper/list/treated',
    method: 'get'
  })
}
/* 提交页面进入右侧table请求 */
export function fetchSubmitList(page, pageSize) {
  return request({
    url: '/exam/userPaper/list/submit?current=' + page + '&total=' + pageSize,
    method: 'get'
  })
}
/* 提交的所有人页面进入右侧table请求 */
export function fetchAllList() {
  return request({
    url: '/exam/userPaper/list/all',
    method: 'get'
  })
}
